<!DOCTYPE html>
<html lang="en-us">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    
<meta charset="UTF-8">
<title>Function score query | Elasticsearch Guide [7.7] | Elastic</title>
<link rel="home" href="index.html" title="Elasticsearch Guide [7.7]">
<link rel="up" href="compound-queries.html" title="Compound queries">
<link rel="prev" href="query-dsl-dis-max-query.html" title="Disjunction max query">
<link rel="next" href="full-text-queries.html" title="Full text queries">
<meta name="DC.type" content="Learn/Docs/Elasticsearch/Reference/7.7">
<meta name="DC.subject" content="Elasticsearch">
<meta name="DC.identifier" content="7.7">
<meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.optimizely.com/js/18132920325.js"></script>
    <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="/manifest.json">
    <meta name="apple-mobile-web-app-title" content="Elastic">
    <meta name="application-name" content="Elastic">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/mstile-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd">
    <meta name="yandex-verification" content="d8a47e95d0972434">
    <meta name="localized" content="true">
    <meta name="st:robots" content="follow,index">
    <meta property="og:image" content="https://www.elastic.co/static/images/elastic-logo-200.png">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
    <link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
    <link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/guide/static/styles.css">
  </head>

  <!--© 2015-2021 Elasticsearch B.V. Copying, publishing and/or distributing without written permission is strictly prohibited.-->

  <body>
    <!-- Google Tag Manager -->
    <script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
    <!-- End Google Tag Manager -->

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-12395217-16');
    </script>

    <!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->
    <script type="text/javascript">
      (function(){var g=function(e,h,f,g){
      this.get=function(a){for(var a=a+"=",c=document.cookie.split(";"),b=0,e=c.length;b<e;b++){for(var d=c[b];" "==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};
      this.set=function(a,c){var b="",b=new Date;b.setTime(b.getTime()+6048E5);b="; expires="+b.toGMTString();document.cookie=a+"="+c+b+"; path=/; "};
      this.check=function(){var a=this.get(f);if(a)a=a.split(":");else if(100!=e)"v"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(":"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case "v":return!1;case "r":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(":")),!c}return!0};
      this.go=function(){if(this.check()){var a=document.createElement("script");a.type="text/javascript";a.src=g;document.body&&document.body.appendChild(a)}};
      this.start=function(){var a=this;window.addEventListener?window.addEventListener("load",function(){a.go()},!1):window.attachEvent&&window.attachEvent("onload",function(){a.go()})}};
      try{(new g(100,"r","QSI_S_ZN_emkP0oSe9Qrn7kF","https://znemkp0ose9qrn7kf-elastic.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_emkP0oSe9Qrn7kF")).start()}catch(i){}})();
    </script><div id="ZN_emkP0oSe9Qrn7kF"><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>
    <!--END WEBSITE FEEDBACK SNIPPET-->

    <div id="elastic-nav" style="display:none;"></div>
    <script src="https://www.elastic.co/elastic-nav.js"></script>

    <!-- Subnav -->
    <div>
      <div>
        <div class="tertiary-nav d-none d-md-block">
          <div class="container">
            <div class="p-t-b-15 d-flex justify-content-between nav-container">
              <div class="breadcrum-wrapper"><span><a href="/guide/" style="font-size: 14px; font-weight: 600; color: #000;">Docs</a></span></div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="main-container">
      <section id="content">
        <div class="content-wrapper">

          <section id="guide" lang="en">
            <div class="container">
              <div class="row">
                <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                  <!-- start body -->
                  <div class="page_header">
<strong>IMPORTANT</strong>: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
<a href="../current/index.html">current release documentation</a>.
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="query-dsl.html">Query DSL</a></span>
»
<span class="breadcrumb-link"><a href="compound-queries.html">Compound queries</a></span>
»
<span class="breadcrumb-node">Function score query</span>
</div>
<div class="navheader">
<span class="prev">
<a href="query-dsl-dis-max-query.html">« Disjunction max query</a>
</span>
<span class="next">
<a href="full-text-queries.html">Full text queries »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="query-dsl-function-score-query"></a>Function score query<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h2>
</div></div></div>

<p>The <code class="literal">function_score</code> allows you to modify the score of documents that are
retrieved by a query. This can be useful if, for example, a score
function is computationally expensive and it is sufficient to compute
the score on a filtered set of documents.</p>
<p>To use <code class="literal">function_score</code>, the user has to define a query and one or
more functions, that compute a new score for each document returned
by the query.</p>
<p><code class="literal">function_score</code> can be used with only one function like this:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
            "query": { "match_all": {} },
            "boost": "5",
            "random_score": {}, <a id="CO36-1"></a><i class="conum" data-value="1"></i>
            "boost_mode":"multiply"
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/100.console"></div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO36-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>See <a class="xref" href="query-dsl-function-score-query.html#score-functions">Function score</a> for a list of supported functions.</p>
</td>
</tr>
</table>
</div>
<p>Furthermore, several functions can be combined. In this case one can
optionally choose to apply the function only if a document matches a
given filtering query</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
          "query": { "match_all": {} },
          "boost": "5", <a id="CO37-1"></a><i class="conum" data-value="1"></i>
          "functions": [
              {
                  "filter": { "match": { "test": "bar" } },
                  "random_score": {}, <a id="CO37-2"></a><i class="conum" data-value="2"></i>
                  "weight": 23
              },
              {
                  "filter": { "match": { "test": "cat" } },
                  "weight": 42
              }
          ],
          "max_boost": 42,
          "score_mode": "max",
          "boost_mode": "multiply",
          "min_score" : 42
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/101.console"></div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO37-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>Boost for the whole query.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO37-2"><i class="conum" data-value="2"></i></a></p>
</td>
<td align="left" valign="top">
<p>See <a class="xref" href="query-dsl-function-score-query.html#score-functions">Function score</a> for a list of supported functions.</p>
</td>
</tr>
</table>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>The scores produced by the filtering query of each function do not matter.</p>
</div>
</div>
<p>If no filter is given with a function this is equivalent to specifying
<code class="literal">"match_all": {}</code></p>
<p>First, each document is scored by the defined functions. The parameter
<code class="literal">score_mode</code> specifies how the computed scores are combined:</p>
<div class="informaltable">
<table border="0" cellpadding="4px">
<colgroup>
<col>
<col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="top">
<p>
<code class="literal">multiply</code>
</p>
</td>
<td valign="top">
<p>
scores are multiplied (default)
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">sum</code>
</p>
</td>
<td valign="top">
<p>
scores are summed
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">avg</code>
</p>
</td>
<td valign="top">
<p>
scores are averaged
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">first</code>
</p>
</td>
<td valign="top">
<p>
the first function that has a matching filter
is applied
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">max</code>
</p>
</td>
<td valign="top">
<p>
maximum score is used
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">min</code>
</p>
</td>
<td valign="top">
<p>
minimum score is used
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>Because scores can be on different scales (for example, between 0 and 1 for decay functions but arbitrary for <code class="literal">field_value_factor</code>) and also
because sometimes a different impact of functions on the score is desirable, the score of each function can be adjusted with a user defined
<code class="literal">weight</code>. The <code class="literal">weight</code> can be defined per function in the <code class="literal">functions</code> array (example above) and is multiplied with the score computed by
the respective function.
If weight is given without any other function declaration, <code class="literal">weight</code> acts as a function that simply returns the <code class="literal">weight</code>.</p>
<p>In case <code class="literal">score_mode</code> is set to <code class="literal">avg</code> the individual scores will be combined by a <span class="strong strong"><strong>weighted</strong></span> average.
For example, if two functions return score 1 and 2 and their respective weights are 3 and 4, then their scores will be combined as
<code class="literal">(1*3+2*4)/(3+4)</code> and <span class="strong strong"><strong>not</strong></span> <code class="literal">(1*3+2*4)/2</code>.</p>
<p>The new score can be restricted to not exceed a certain limit by setting
the <code class="literal">max_boost</code> parameter. The default for <code class="literal">max_boost</code> is FLT_MAX.</p>
<p>The newly computed score is combined with the score of the
query. The parameter <code class="literal">boost_mode</code> defines how:</p>
<div class="informaltable">
<table border="0" cellpadding="4px">
<colgroup>
<col>
<col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="top">
<p>
<code class="literal">multiply</code>
</p>
</td>
<td valign="top">
<p>
query score and function score is multiplied (default)
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">replace</code>
</p>
</td>
<td valign="top">
<p>
only function score is used, the query score is ignored
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">sum</code>
</p>
</td>
<td valign="top">
<p>
query score and function score are added
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">avg</code>
</p>
</td>
<td valign="top">
<p>
average
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">max</code>
</p>
</td>
<td valign="top">
<p>
max of query score and function score
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">min</code>
</p>
</td>
<td valign="top">
<p>
min of query score and function score
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>By default, modifying the score does not change which documents match. To exclude
documents that do not meet a certain score threshold the <code class="literal">min_score</code> parameter can be set to the desired score threshold.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>For <code class="literal">min_score</code> to work, <span class="strong strong"><strong>all</strong></span> documents returned by the query need to be scored and then filtered out one by one.</p>
</div>
</div>
<p><a id="score-functions"></a>The <code class="literal">function_score</code> query provides several types of score functions.</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="query-dsl-function-score-query.html#function-script-score" title="Script score"><code class="literal">script_score</code></a>
</li>
<li class="listitem">
<a class="xref" href="query-dsl-function-score-query.html#function-weight" title="Weight"><code class="literal">weight</code></a>
</li>
<li class="listitem">
<a class="xref" href="query-dsl-function-score-query.html#function-random" title="Random"><code class="literal">random_score</code></a>
</li>
<li class="listitem">
<a class="xref" href="query-dsl-function-score-query.html#function-field-value-factor" title="Field Value factor"><code class="literal">field_value_factor</code></a>
</li>
<li class="listitem">
<a class="xref" href="query-dsl-function-score-query.html#function-decay" title="Decay functions">decay functions</a>: <code class="literal">gauss</code>, <code class="literal">linear</code>, <code class="literal">exp</code>
</li>
</ul>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="function-script-score"></a>Script score<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The <code class="literal">script_score</code> function allows you to wrap another query and customize
the scoring of it optionally with a computation derived from other numeric
field values in the doc using a script expression. Here is a
simple sample:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
            "query": {
                "match": { "message": "elasticsearch" }
            },
            "script_score" : {
                "script" : {
                  "source": "Math.log(2 + doc['likes'].value)"
                }
            }
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/102.console"></div>
<div class="important admon">
<div class="icon"></div>
<div class="admon_content">
<p>In Elasticsearch, all document scores are positive 32-bit floating point numbers.</p>
<p>If the <code class="literal">script_score</code> function produces a score with greater precision, it is
converted to the nearest 32-bit float.</p>
<p>Similarly, scores must be non-negative. Otherwise, Elasticsearch returns an error.</p>
</div>
</div>
<p>On top of the different scripting field values and expression, the
<code class="literal">_score</code> script parameter can be used to retrieve the score based on the
wrapped query.</p>
<p>Scripts compilation is cached for faster execution. If the script has
parameters that it needs to take into account, it is preferable to reuse the
same script, and provide parameters to it:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
            "query": {
                "match": { "message": "elasticsearch" }
            },
            "script_score" : {
                "script" : {
                    "params": {
                        "a": 5,
                        "b": 1.2
                    },
                    "source": "params.a / Math.pow(params.b, doc['likes'].value)"
                }
            }
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/103.console"></div>
<p>Note that unlike the <code class="literal">custom_score</code> query, the
score of the query is multiplied with the result of the script scoring. If
you wish to inhibit this, set <code class="literal">"boost_mode": "replace"</code></p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="function-weight"></a>Weight<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The <code class="literal">weight</code> score allows you to multiply the score by the provided
<code class="literal">weight</code>. This can sometimes be desired since boost value set on
specific queries gets normalized, while for this score function it does
not. The number value is of type float.</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">"weight" : number</pre>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="function-random"></a>Random<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The <code class="literal">random_score</code> generates scores that are uniformly distributed from 0 up to
but not including 1. By default, it uses the internal Lucene doc ids as a
source of randomness, which is very efficient but unfortunately not
reproducible since documents might be renumbered by merges.</p>
<p>In case you want scores to be reproducible, it is possible to provide a <code class="literal">seed</code>
and <code class="literal">field</code>. The final score will then be computed based on this seed, the
minimum value of <code class="literal">field</code> for the considered document and a salt that is computed
based on the index name and shard id so that documents that have the same
value but are stored in different indexes get different scores. Note that
documents that are within the same shard and have the same value for <code class="literal">field</code>
will however get the same score, so it is usually desirable to use a field that
has unique values for all documents. A good default choice might be to use the
<code class="literal">_seq_no</code> field, whose only drawback is that scores will change if the document
is updated since update operations also update the value of the <code class="literal">_seq_no</code> field.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>It was possible to set a seed without setting a field, but this has been
deprecated as this requires loading fielddata on the <code class="literal">_id</code> field which consumes
a lot of memory.</p>
</div>
</div>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
            "random_score": {
                "seed": 10,
                "field": "_seq_no"
            }
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/104.console"></div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="function-field-value-factor"></a>Field Value factor<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The <code class="literal">field_value_factor</code> function allows you to use a field from a document to
influence the score. It’s similar to using the <code class="literal">script_score</code> function, however,
it avoids the overhead of scripting. If used on a multi-valued field, only the
first value of the field is used in calculations.</p>
<p>As an example, imagine you have a document indexed with a numeric <code class="literal">likes</code>
field and wish to influence the score of a document with this field, an example
doing so would look like:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
            "field_value_factor": {
                "field": "likes",
                "factor": 1.2,
                "modifier": "sqrt",
                "missing": 1
            }
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/105.console"></div>
<p>Which will translate into the following formula for scoring:</p>
<p><code class="literal">sqrt(1.2 * doc['likes'].value)</code></p>
<p>There are a number of options for the <code class="literal">field_value_factor</code> function:</p>
<div class="informaltable">
<table border="0" cellpadding="4px">
<colgroup>
<col>
<col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="top">
<p>
<code class="literal">field</code>
</p>
</td>
<td valign="top">
<p>
Field to be extracted from the document.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">factor</code>
</p>
</td>
<td valign="top">
<p>
Optional factor to multiply the field value with, defaults to <code class="literal">1</code>.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">modifier</code>
</p>
</td>
<td valign="top">
<p>
Modifier to apply to the field value, can be one of: <code class="literal">none</code>, <code class="literal">log</code>,
<code class="literal">log1p</code>, <code class="literal">log2p</code>, <code class="literal">ln</code>, <code class="literal">ln1p</code>, <code class="literal">ln2p</code>, <code class="literal">square</code>, <code class="literal">sqrt</code>, or <code class="literal">reciprocal</code>.
Defaults to <code class="literal">none</code>.
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1">
<col class="col_2">
</colgroup>
<thead>
<tr>
<th align="left" valign="top">Modifier</th>
<th align="left" valign="top">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p><code class="literal">none</code></p></td>
<td align="left" valign="top"><p>Do not apply any multiplier to the field value</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">log</code></p></td>
<td align="left" valign="top"><p>Take the <a href="https://en.wikipedia.org/wiki/Common_logarithm" class="ulink" target="_top">common logarithm</a> of the field value.
          Because this function will return a negative value and cause an error if used on values
          between 0 and 1, it is recommended to use <code class="literal">log1p</code> instead.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">log1p</code></p></td>
<td align="left" valign="top"><p>Add 1 to the field value and take the common logarithm</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">log2p</code></p></td>
<td align="left" valign="top"><p>Add 2 to the field value and take the common logarithm</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">ln</code></p></td>
<td align="left" valign="top"><p>Take the <a href="https://en.wikipedia.org/wiki/Natural_logarithm" class="ulink" target="_top">natural logarithm</a> of the field value.
         Because this function will return a negative value and cause an error if used on values
         between 0 and 1, it is recommended to use <code class="literal">ln1p</code> instead.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">ln1p</code></p></td>
<td align="left" valign="top"><p>Add 1 to the field value and take the natural logarithm</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">ln2p</code></p></td>
<td align="left" valign="top"><p>Add 2 to the field value and take the natural logarithm</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">square</code></p></td>
<td align="left" valign="top"><p>Square the field value (multiply it by itself)</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">sqrt</code></p></td>
<td align="left" valign="top"><p>Take the <a href="https://en.wikipedia.org/wiki/Square_root" class="ulink" target="_top">square root</a> of the field value</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">reciprocal</code></p></td>
<td align="left" valign="top"><p><a href="https://en.wikipedia.org/wiki/Multiplicative_inverse" class="ulink" target="_top">Reciprocate</a> the field value, same as <code class="literal">1/x</code> where <code class="literal">x</code> is the field’s value</p></td>
</tr>
</tbody>
</table>
</div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">missing</code>
</span>
</dt>
<dd>
Value used if the document doesn’t have that field. The modifier
and factor are still applied to it as though it were read from the document.
</dd>
</dl>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>Scores produced by the <code class="literal">field_value_score</code> function must be
non-negative, otherwise an error will be thrown. The <code class="literal">log</code> and <code class="literal">ln</code> modifiers
will produce negative values if used on values between 0 and 1. Be sure to limit
the values of the field with a range filter to avoid this, or use <code class="literal">log1p</code> and
<code class="literal">ln1p</code>.</p>
</div>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>Keep in mind that taking the log() of 0, or the square root of a
negative number is an illegal operation, and an exception will be thrown. Be
sure to limit the values of the field with a range filter to avoid this, or use
<code class="literal">log1p</code> and <code class="literal">ln1p</code>.</p>
</div>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="function-decay"></a>Decay functions<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Decay functions score a document with a function that decays depending
on the distance of a numeric field value of the document from a user
given origin. This is similar to a range query, but with smooth edges
instead of boxes.</p>
<p>To use distance scoring on a query that has numerical fields, the user
has to define an <code class="literal">origin</code> and a <code class="literal">scale</code> for each field. The <code class="literal">origin</code>
is needed to define the “central point” from which the distance
is calculated, and the <code class="literal">scale</code> to define the rate of decay. The
decay function is specified as</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">"DECAY_FUNCTION": { <a id="CO38-1"></a><i class="conum" data-value="1"></i>
    "FIELD_NAME": { <a id="CO38-2"></a><i class="conum" data-value="2"></i>
          "origin": "11, 12",
          "scale": "2km",
          "offset": "0km",
          "decay": 0.33
    }
}</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO38-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>The <code class="literal">DECAY_FUNCTION</code> should be one of <code class="literal">linear</code>, <code class="literal">exp</code>, or <code class="literal">gauss</code>.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO38-2"><i class="conum" data-value="2"></i></a></p>
</td>
<td align="left" valign="top">
<p>The specified field must be a numeric, date, or geo-point field.</p>
</td>
</tr>
</table>
</div>
<p>In the above example, the field is a <a class="xref" href="geo-point.html" title="Geo-point datatype"><code class="literal">geo_point</code></a> and origin can
be provided in geo format. <code class="literal">scale</code> and <code class="literal">offset</code> must be given with a unit in
this case. If your field is a date field, you can set <code class="literal">scale</code> and <code class="literal">offset</code> as
days, weeks, and so on. Example:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
            "gauss": {
                "date": {
                      "origin": "2013-09-17", <a id="CO39-1"></a><i class="conum" data-value="1"></i>
                      "scale": "10d",
                      "offset": "5d", <a id="CO39-2"></a><i class="conum" data-value="2"></i>
                      "decay" : 0.5 <a id="CO39-3"></a><i class="conum" data-value="2"></i>
                }
            }
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/106.console"></div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO39-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>The date format of the origin depends on the <a class="xref" href="mapping-date-format.html" title="format"><code class="literal">format</code></a> defined in
your mapping. If you do not define the origin, the current time is used.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO39-2"><i class="conum" data-value="2"></i></a><a href="#CO39-3"></a></p>
</td>
<td align="left" valign="top">
<p>The <code class="literal">offset</code> and <code class="literal">decay</code> parameters are optional.</p>
</td>
</tr>
</table>
</div>
<div class="informaltable">
<table border="0" cellpadding="4px">
<colgroup>
<col>
<col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="top">
<p>
<code class="literal">origin</code>
</p>
</td>
<td valign="top">
<p>
The point of origin used for calculating distance. Must be given as a
number for numeric field, date for date fields and geo point for geo fields.
Required for geo and numeric field. For date fields the default is <code class="literal">now</code>. Date
math (for example <code class="literal">now-1h</code>) is supported for origin.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">scale</code>
</p>
</td>
<td valign="top">
<p>
Required for all types. Defines the distance from origin + offset at which the computed
score will equal <code class="literal">decay</code> parameter. For geo fields: Can be defined as number+unit (1km, 12m,…​).
Default unit is meters. For date fields: Can to be defined as a number+unit ("1h", "10d",…​).
Default unit is milliseconds. For numeric field: Any number.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">offset</code>
</p>
</td>
<td valign="top">
<p>
If an <code class="literal">offset</code> is defined, the decay function will only compute the
decay function for documents with a distance greater than the defined
<code class="literal">offset</code>. The default is 0.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">decay</code>
</p>
</td>
<td valign="top">
<p>
The <code class="literal">decay</code> parameter defines how documents are scored at the distance
given at <code class="literal">scale</code>. If no <code class="literal">decay</code> is defined, documents at the distance
<code class="literal">scale</code> will be scored 0.5.
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>In the first example, your documents might represents hotels and contain a geo
location field. You want to compute a decay function depending on how
far the hotel is from a given location. You might not immediately see
what scale to choose for the gauss function, but you can say something
like: "At a distance of 2km from the desired location, the score should
be reduced to one third."
The parameter "scale" will then be adjusted automatically to assure that
the score function computes a score of 0.33 for hotels that are 2km away
from the desired location.</p>
<p>In the second example, documents with a field value between 2013-09-12 and 2013-09-22 would get a weight of 1.0 and documents which are 15 days from that date a weight of 0.5.</p>
<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="_supported_decay_functions"></a>Supported decay functions<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h4>
</div></div></div>
<p>The <code class="literal">DECAY_FUNCTION</code> determines the shape of the decay:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">gauss</code>
</span>
</dt>
<dd>
<p>Normal decay, computed as:</p>
<p><span class="image"><img src="images/Gaussian.png" alt="Gaussian"></span></p>
<p>where <span class="image"><img src="images/sigma.png" alt="sigma"></span> is computed to assure that the score takes the value <code class="literal">decay</code> at distance <code class="literal">scale</code> from <code class="literal">origin</code>+-<code class="literal">offset</code></p>
<p><span class="image"><img src="images/sigma_calc.png" alt="sigma calc"></span></p>
<p>See <a class="xref" href="query-dsl-function-score-query.html#gauss-decay" title="Normal decay, keyword gauss">Normal decay, keyword <code class="literal">gauss</code></a> for graphs demonstrating the curve generated by the <code class="literal">gauss</code> function.</p>
</dd>
<dt>
<span class="term">
<code class="literal">exp</code>
</span>
</dt>
<dd>
<p>Exponential decay, computed as:</p>
<p><span class="image"><img src="images/Exponential.png" alt="Exponential"></span></p>
<p>where again the parameter <span class="image"><img src="images/lambda.png" alt="lambda"></span> is computed to assure that the score takes the value <code class="literal">decay</code> at distance <code class="literal">scale</code> from <code class="literal">origin</code>+-<code class="literal">offset</code></p>
<p><span class="image"><img src="images/lambda_calc.png" alt="lambda calc"></span></p>
<p>See <a class="xref" href="query-dsl-function-score-query.html#exp-decay" title="Exponential decay, keyword exp">Exponential decay, keyword <code class="literal">exp</code></a> for graphs demonstrating the curve generated by the <code class="literal">exp</code> function.</p>
</dd>
<dt>
<span class="term">
<code class="literal">linear</code>
</span>
</dt>
<dd>
<p>Linear decay, computed as:</p>
<p><span class="image"><img src="images/Linear.png" alt="Linear"></span>.</p>
<p>where again the parameter <code class="literal">s</code> is computed to assure that the score takes the value <code class="literal">decay</code> at distance <code class="literal">scale</code> from <code class="literal">origin</code>+-<code class="literal">offset</code></p>
<p><span class="image"><img src="images/s_calc.png" alt="s calc"></span></p>
<p>In contrast to the normal and exponential decay, this function actually
sets the score to 0 if the field value exceeds twice the user given
scale value.</p>
</dd>
</dl>
</div>
<p>For single functions the three decay functions together with their parameters can be visualized like this (the field in this example called "age"):</p>
<p><span class="image"><img src="images/decay_2d.png" alt="decay 2d" width="600"></span></p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="_multi_values_fields"></a>Multi-values fields<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h4>
</div></div></div>
<p>If a field used for computing the decay contains multiple values, per default the value closest to the origin is chosen for determining the distance.
This can be changed by setting <code class="literal">multi_value_mode</code>.</p>
<div class="informaltable">
<table border="0" cellpadding="4px">
<colgroup>
<col>
<col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="top">
<p>
<code class="literal">min</code>
</p>
</td>
<td valign="top">
<p>
Distance is the minimum distance
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">max</code>
</p>
</td>
<td valign="top">
<p>
Distance is the maximum distance
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">avg</code>
</p>
</td>
<td valign="top">
<p>
Distance is the average distance
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
<code class="literal">sum</code>
</p>
</td>
<td valign="top">
<p>
Distance is the sum of all distances
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>Example:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">    "DECAY_FUNCTION": {
        "FIELD_NAME": {
              "origin": ...,
              "scale": ...
        },
        "multi_value_mode": "avg"
    }</pre>
</div>
</div>

</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_detailed_example"></a>Detailed example<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Suppose you are searching for a hotel in a certain town. Your budget is
limited. Also, you would like the hotel to be close to the town center,
so the farther the hotel is from the desired location the less likely
you are to check in.</p>
<p>You would like the query results that match your criterion (for
example, "hotel, Nancy, non-smoker") to be scored with respect to
distance to the town center and also the price.</p>
<p>Intuitively, you would like to define the town center as the origin and
maybe you are willing to walk 2km to the town center from the hotel.<br>
In this case your <span class="strong strong"><strong>origin</strong></span> for the location field is the town center
and the <span class="strong strong"><strong>scale</strong></span> is ~2km.</p>
<p>If your budget is low, you would probably prefer something cheap above
something expensive.  For the price field, the <span class="strong strong"><strong>origin</strong></span> would be 0 Euros
and the <span class="strong strong"><strong>scale</strong></span> depends on how much you are willing to pay, for example 20 Euros.</p>
<p>In this example, the fields might be called "price" for the price of the
hotel and "location" for the coordinates of this hotel.</p>
<p>The function for <code class="literal">price</code> in this case would be</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">"gauss": { <a id="CO40-1"></a><i class="conum" data-value="1"></i>
    "price": {
          "origin": "0",
          "scale": "20"
    }
}</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO40-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>This decay function could also be <code class="literal">linear</code> or <code class="literal">exp</code>.</p>
</td>
</tr>
</table>
</div>
<p>and for <code class="literal">location</code>:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">"gauss": { <a id="CO41-1"></a><i class="conum" data-value="1"></i>
    "location": {
          "origin": "11, 12",
          "scale": "2km"
    }
}</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO41-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>This decay function could also be <code class="literal">linear</code> or <code class="literal">exp</code>.</p>
</td>
</tr>
</table>
</div>
<p>Suppose you want to multiply these two functions on the original score,
the request would look like this:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_search
{
    "query": {
        "function_score": {
          "functions": [
            {
              "gauss": {
                "price": {
                  "origin": "0",
                  "scale": "20"
                }
              }
            },
            {
              "gauss": {
                "location": {
                  "origin": "11, 12",
                  "scale": "2km"
                }
              }
            }
          ],
          "query": {
            "match": {
              "properties": "balcony"
            }
          },
          "score_mode": "multiply"
        }
    }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/107.console"></div>
<p>Next, we show how the computed score looks like for each of the three
possible decay functions.</p>
<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="gauss-decay"></a>Normal decay, keyword <code class="literal">gauss</code><a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h4>
</div></div></div>
<p>When choosing <code class="literal">gauss</code> as the decay function in the above example, the
contour and surface plot of the multiplier looks like this:</p>
<div class="imageblock">
<div class="content">
<img src="https://f.cloud.github.com/assets/4320215/768157/cd0e18a6-e898-11e2-9b3c-f0145078bd6f.png" alt="cd0e18a6 e898 11e2 9b3c f0145078bd6f" width="700px">
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="https://f.cloud.github.com/assets/4320215/768160/ec43c928-e898-11e2-8e0d-f3c4519dbd89.png" alt="ec43c928 e898 11e2 8e0d f3c4519dbd89" width="700px">
</div>
</div>
<p>Suppose your original search results matches three hotels :</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
"Backback Nap"
</li>
<li class="listitem">
"Drink n Drive"
</li>
<li class="listitem">
"BnB Bellevue".
</li>
</ul>
</div>
<p>"Drink n Drive" is pretty far from your defined location (nearly 2 km)
and is not too cheap (about 13 Euros) so it gets a low factor a factor
of 0.56. "BnB Bellevue" and "Backback Nap" are both pretty close to the
defined location but "BnB Bellevue" is cheaper, so it gets a multiplier
of 0.86 whereas "Backpack Nap" gets a value of 0.66.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="exp-decay"></a>Exponential decay, keyword <code class="literal">exp</code><a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h4>
</div></div></div>
<p>When choosing <code class="literal">exp</code> as the decay function in the above example, the
contour and surface plot of the multiplier looks like this:</p>
<div class="imageblock">
<div class="content">
<img src="https://f.cloud.github.com/assets/4320215/768161/082975c0-e899-11e2-86f7-174c3a729d64.png" alt="082975c0 e899 11e2 86f7 174c3a729d64" width="700px">
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="https://f.cloud.github.com/assets/4320215/768162/0b606884-e899-11e2-907b-aefc77eefef6.png" alt="0b606884 e899 11e2 907b aefc77eefef6" width="700px">
</div>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="linear-decay"></a>Linear decay, keyword <code class="literal">linear</code><a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h4>
</div></div></div>
<p>When choosing <code class="literal">linear</code> as the decay function in the above example, the
contour and surface plot of the multiplier looks like this:</p>
<div class="imageblock">
<div class="content">
<img src="https://f.cloud.github.com/assets/4320215/768164/1775b0ca-e899-11e2-9f4a-776b406305c6.png" alt="1775b0ca e899 11e2 9f4a 776b406305c6" width="700px">
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="https://f.cloud.github.com/assets/4320215/768165/19d8b1aa-e899-11e2-91bc-6b0553e8d722.png" alt="19d8b1aa e899 11e2 91bc 6b0553e8d722" width="700px">
</div>
</div>
</div>

</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_supported_fields_for_decay_functions"></a>Supported fields for decay functions<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Only numeric, date, and geo-point fields are supported.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_what_if_a_field_is_missing"></a>What if a field is missing?<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/query-dsl/function-score-query.asciidoc">edit</a>
</h3>
</div></div></div>
<p>If the numeric field is missing in the document, the function will
return 1.</p>
</div>

</div>
<div class="navfooter">
<span class="prev">
<a href="query-dsl-dis-max-query.html">« Disjunction max query</a>
</span>
<span class="next">
<a href="full-text-queries.html">Full text queries »</a>
</span>
</div>
</div>

                  <!-- end body -->
                </div>
                <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                  <div id="rtpcontainer" style="display: block;">
                    <div class="mktg-promo">
                      <h3>Most Popular</h3>
                      <ul class="icons">
                        <li class="icon-elasticsearch-white"><a href="https://www.elastic.co/webinars/getting-started-elasticsearch?baymax=default&amp;elektra=docs&amp;storm=top-video">Get Started with Elasticsearch: Video</a></li>
                        <li class="icon-kibana-white"><a href="https://www.elastic.co/webinars/getting-started-kibana?baymax=default&amp;elektra=docs&amp;storm=top-video">Intro to Kibana: Video</a></li>
                        <li class="icon-logstash-white"><a href="https://www.elastic.co/webinars/introduction-elk-stack?baymax=default&amp;elektra=docs&amp;storm=top-video">ELK for Logs &amp; Metrics: Video</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </section>

        </div>


<div id="elastic-footer"></div>
<script src="https://www.elastic.co/elastic-footer.js"></script>
<!-- Footer Section end-->

      </section>
    </div>

<script src="/guide/static/jquery.js"></script>
<script type="text/javascript" src="/guide/static/docs.js"></script>
<script type="text/javascript">
  window.initial_state = {}</script>
  </body>
</html>
